<%--
  Created by IntelliJ IDEA.
  User: jcl
  Date: 2020/8/18
  Time: 15:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>认定列表-老师</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/lib/layui/layui/css/layui.css"/>
    <script type="text/javascript" src="/js/news/jquery-1.9.1.js"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/lib/layui/layui/layui.js"></script>
    <script type="text/javascript" src="/lib/layui/layui/layui.all.js"></script>
</head>
<style>
    .btn{
        float: right;
    }
</style>
<body>
<div>
    <div class="item">
        <img src="../img/chengguo.png" alt="" style="margin: 0 5px 0 20px;"> <span
            style="font-size: 22px;display: inline-block;vertical-align: middle;">定级列表</span>
    </div>
    <hr  class="layui-bg-blue">
    <div style="height: 30px;">
        <div class="btn">
            <button type="button" class="layui-btn immp layui-btn-sm " id="export" style="margin-right: 15px" >
                <i class="layui-icon">&#xe601;</i>
                导出
            </button>
        </div>

    </div>
    <div>
        <table class="layui-hide" id="Settlement" lay-filter="SettlementFilter"></table>
    </div>
</div>
</body>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="look">查看</a>
</script>
<script>
    layui.use(['table','layer','laydate','upload','form'], function(){
        var table = layui.table
            ,layer=layui.layer
            ,laydate=layui.laydate
            ,upload=layui.upload
            ,form=layui.form
        $(document).ready(function(){
            form.render();
        });
        table.render({
            elem: '#Settlement'
            ,url:"/ResultManagement/gradingList?type=1&pageSize=10&useFlag=true"
            ,cols: [[
                {field:'planName', title: '计划名称', align: 'center'}
                ,{field:'deptName', title: '科室', align: 'center'}
                ,{field:'userName', title: '姓名', align: 'center'} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
                ,{field:'filingTime', title: '备案时间', align: 'center'}
                ,{field:'xszz', title: '学术著作(数)', align: 'center'}
                ,{field:'xslw', title: '学术论文(数)', align: 'center'}
                ,{field:'xsltztfy', title: '学术论坛主题发言(数)', align: 'center'}
                ,{field:'jtcg', title: '结题成果(数)', align: 'center'}
                ,{field:'pxhj', title: '评选获奖(数)', align: 'center'}
                ,{field:'trOther', title: '认定(数)', align: 'center',templet:function (d) {
                        if(d.trOther == undefined || d.trOther == "undefined" || d.trOther == "" || d.trOther == null){
                            d.trOther = "无"
                        }else{
                            d.trOther = d.trOther;
                        }
                        var str= d.xszz + d.xslw + d.xsltztfy + d.jtcg + d.pxhj + "/" + d.trOther;
                        return str
                    }}
                ,{field: 'type', title: '操作', toolbar: '#barDemo'}
            ]],
            page:true
            ,parseData: function(res){ //res 即为原始返回的数据
                return {
                    "code": 0, //解析接口状态
                    "count": res.totleNum, //解析数据长度
                    "data": res.obj //解析数据列表
                }
            },
            done:function (res) {

            }
        });
        $("#export").click(function(){
            window.location.href = '/rpmTopic/getExportdocument?type=1';
        });
        //监听行工具事件
        table.on('tool(SettlementFilter)', function(obj){
            var data = obj.data;
            if(obj.event == 'look'){
                window.location.href='/rpmPlan/lookreview?type=2&btype=look&userId='+data.userId+'&planId='+data.planId
            }
        });
    })
</script>
</html>
